home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1992 by Nicholas Wilt. All rights reserved.
-
- #include <iostream.h>
- #include <stdlib.h>
- #include "insort.h"
-
- #define NUMINTS 10
-
- int
- main()
- {
- int i;
- int x[NUMINTS];
-
- randomize();
- for (i = 0; i < NUMINTS; i++) {
- x[i] = rand();
- cout << x[i] << ' ';
- }
- cout << '\n';
- InsertionSort(x, NUMINTS);
- for (i = 0; i < NUMINTS; i++)
- cout << x[i] << ' ';
- cout << '\n';
-
- return 0;
- }
-
-
-